package com.eightbears.beboy.base.view.banner;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;

import com.bigkoo.convenientbanner.holder.Holder;
import com.eightbears.beboy.R;
import com.eightbears.beboy.base.util.CommonUtils;
import com.makeramen.roundedimageview.RoundedImageView;

/**
 * Created by Bao on 2016/8/22.
 */
public class LocalImageHolderView implements Holder<String> {
    private RoundedImageView imageView;
    @Override
    public View createView(Context context) {
        imageView = new RoundedImageView(context);
        imageView.setCornerRadius(0);
        imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
        return imageView;
    }

    @Override
    public void UpdateUI(Context context, int position, String data) {
        CommonUtils.loadImageView(context, data, R.mipmap.default_image, imageView);
    }
}
